package com.fuhao.order.service;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.fuhao.service.UserService;

public class OrderService {
	public static void main(String[] args) throws IOException {
		ClassPathXmlApplicationContext context= new ClassPathXmlApplicationContext("comsumer.xml");
		context.start();
		System.out.println("订单服务启动成功。。。");
		UserService userService = (UserService) context.getBean("userService");
		System.out.println("开始调用服务。。。");
		String user = userService.getUser(1L);
		System.out.println("调用服务结束，result:" + user);
		//System.in.read();
	}
}
